$package('jeecg.${classname}');
jeecg.${classname} = function(){
	var _box = null;
	var _this = {
		config:{
			event:{
				add:function(){
					$('#typeIds_combobox').combobox('reload');
					_box.handler.add();
				},
				edit:function(){
					$('#typeIds_combobox').combobox('reload');
					_box.handler.edit();
				}
			},
  			dataGrid:{
  				title:'<#if tableComment!=''>${tableComment}<#else>${tableName}</#if>列表',
	   			url:'dataList.do',
	   			columns:[[
					{field:'id',checkbox:true},
<#list columnList as columnEntity >
<#if columnEntity.pki==true > 
					{field:'_${columnEntity.javaname}',title:'_id',align:'center'<#if columnEntity.columnMaxLength<=100 > ,width:80 <#else> ,width:120</#if>,
						formatter:function(value,row,index){
							return row.${columnEntity.javaname};
						}
					}<#if columnEntity_has_next> ,</#if>
<#else>
					{field:'${columnEntity.javaname}',title:'<#if columnEntity.columnComment!='' >${columnEntity.columnComment}<#else>${columnEntity.javaname}</#if>',align:'center'<#if columnEntity.columnMaxLength<=100 > ,width:150 <#else> ,width:260</#if>,
						formatter:function(value,row,index){
							return row.${columnEntity.javaname};
						}
					}<#if columnEntity_has_next> ,</#if>
</#if>
</#list>
				]]
			}
		},
		init:function(){
			_box = new YDataGrid(_this.config); 
			_box.init();
		}
	}
	return _this;
}();

$(function(){
	jeecg.${classname}.init();
});